﻿<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="${ctxPath}/r/lib/html5.js"></script>
<script type="text/javascript" src="${ctxPath}/r/lib/respond.min.js"></script>
<script type="text/javascript" src="${ctxPath}/r/lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="${ctxPath}/r/system/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="${ctxPath}/r/system/h-ui/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="${ctxPath}/r/lib/Hui-iconfont/1.0.7/iconfont.css" />
<link rel="stylesheet" type="text/css" href="${ctxPath}/r/lib/icheck/icheck.css" />
<link rel="stylesheet" type="text/css" href="${ctxPath}/r/system/h-ui/skin/default/skin.css" id="skin" />
<link rel="stylesheet" href="${ctxPath}/r/lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>内容管理</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
	 文章管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="pos-a" style="width:160px;left:0;top:40px; bottom:0; height:100%; border-right:1px solid #e5e5e5;background-color:#f5f5f5">
	<ul id="treeDemo" class="ztree">
	</ul>
</div>
<div style="margin-left:160px;">
<IFRAME ID="contentList" Name="contentList" FRAMEBORDER="0" SCROLLING="AUTO" width="100%"  height="500px" SRC="${ctxPath}/system/content/list/0"></IFRAME>
</div>
<script type="text/javascript" src="${ctxPath}/r/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="${ctxPath}/r/lib/layer/2.1/layer.js"></script> 
<script type="text/javascript" src="${ctxPath}/r/lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script> 
<script type="text/javascript" src="${ctxPath}/r/system/h-ui/js/H-ui.js"></script> 
<script type="text/javascript" src="${ctxPath}/r/system/h-ui/js/H-ui.admin.js"></script> 
<script type="text/javascript">
var setting = {
	async: {
			enable: true,
			url:"${ctxPath}/system/category/getCategoryList",
			autoParam:["id"],
			otherParam:{"otherParam":"zTreeAsyncTest"}
	},
	view: {
		dblClickExpand: false,
		showLine: false,
		selectedMulti: false
	},
	data: {
		simpleData: {
			enable:true,
			idKey: "id",
			pIdKey: "pId",
			rootPId: ""
		}
	},
	callback: {
	  onClick: onClick
	}
};		

function onClick(event, treeId, treeNode, clickFlag) {
	var zTree = $.fn.zTree.getZTreeObj("tree");
	    if(treeNode.id!=0){
	    	//alert(treeNode.id);
	    	contentList.attr("src","${ctxPath}/system/content/list/"+treeNode.id);
		 return true;
	    }
	    return false;
}	

var code;
		
function showCode(str) {
	if (!code) code = $("#code");
	code.empty();
	code.append("<li>"+str+"</li>");
}
		
$(document).ready(function(){
	var t = $("#treeDemo");
	t = $.fn.zTree.init(t, setting);
	contentList = $("#contentList");
	catInput.bind("load", loadReady);
	var zTree = $.fn.zTree.getZTreeObj("tree");
	zTree.selectNode(zTree.getNodeByParam("id",'11'));
});
</script>
</body>
</html>